import request from "@/utils/request";

// 空域类型下拉框
export function getAirspaceType() {
    return request({
        url: '/flight/settings/getAirspaceType',
        method: 'get'
    })
}

// 空域状态下拉框
export function getAirspaceStatus(dictType) {
    return request({
        url: '/system/dict/data/type/' + dictType,
        method: 'get'
    })
}

// 空域查询
export function getAirspaceQuery(airAirspaceIds) {
    return request({
        url: '/flight/settings/getAirspace/'+ airAirspaceIds,
        method: 'get'
    })
}

// 查询空域设置信息列表
export function getList(query, data) {
    return request({
        url: '/flight/settings/list',
        method: 'post',
        params: query,
        data
    })
}

// 获取空域设置信息详细信息
export function getDetailInfo(airspaceId) {
    return request({
        url: '/flight/settings/'+ airspaceId,
        method: 'get'
    })
}

// 停用/启用空域设置信息
export function onOff(data) {
    return request({
        url: '/flight/settings/onOff',
        method: 'put',
        data: data
    })
}

// 新增空域设置信息
export function settingsAdd(data) {
    return request({
        url: '/flight/settings/add',
        method: 'post',
        data: data
    })
}

// 文件上传
export function upload(data) {
    return request({
        url: '/file/upload',
        method: 'post',
        data: data
    })
}

// 删除空域设置信息
export function deleteAirspace(airspaceId) {
    return request({
        url: '/flight/settings/' + airspaceId,
        method: 'DELETE'
    })
}

// 修改空域设置信息
export function settingsEdit(data) {
    return request({
        url: '/flight/settings/edit',
        method: 'put',
        data: data
    })
}






